package at.guigu.service;

import at.guigu.dao.UserDao;
import at.guigu.pojo.User;

import java.util.List;

public class UserService {
    private UserDao userDao;
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
    public void inMoney(String name, Double money) {
        userDao.inMoney(name, money);
    }
    public void outMoney(String name, Double money) {
        userDao.outMoney(name, money);
    }
    public void transfer(String out, String in, Double money) {
        this.outMoney(out, money);
        int a = 1/0;
        this.inMoney(in, money);
    }
    public List<User> getAll() {
        return userDao.all();
    }
}